package com.empire.module.spider.dal.mysql.lotterybasketballmatchsporttery;

import java.util.*;

import com.empire.framework.common.pojo.PageResult;
import com.empire.framework.mybatis.core.query.LambdaQueryWrapperX;
import com.empire.framework.mybatis.core.mapper.BaseMapperX;
import com.empire.module.spider.dal.dataobject.lotterybasketballmatchsporttery.LotteryBasketballMatchSportteryDO;
import org.apache.ibatis.annotations.Mapper;
import com.empire.module.spider.controller.app.lotterybasketballmatchsporttery.vo.*;

/**
 * 篮球竞猜 Mapper
 *
 * @author 无敌
 */
@Mapper
public interface LotteryBasketballMatchSportteryMapper extends BaseMapperX<LotteryBasketballMatchSportteryDO> {

    default PageResult<LotteryBasketballMatchSportteryDO> selectPage(AppLotteryBasketballMatchSportteryPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<LotteryBasketballMatchSportteryDO>()
                .betweenIfPresent(LotteryBasketballMatchSportteryDO::getBusinessDate, reqVO.getBusinessDate())
                .likeIfPresent(LotteryBasketballMatchSportteryDO::getHomeTeamAbbName, reqVO.getHomeTeamAbbName())
                .eqIfPresent(LotteryBasketballMatchSportteryDO::getHomeTeamId, reqVO.getHomeTeamId())
                .likeIfPresent(LotteryBasketballMatchSportteryDO::getAwayTeamAbbName, reqVO.getAwayTeamAbbName())
                .eqIfPresent(LotteryBasketballMatchSportteryDO::getAwayTeamId, reqVO.getAwayTeamId())
                .likeIfPresent(LotteryBasketballMatchSportteryDO::getLeagueAbbName, reqVO.getLeagueAbbName())
                .betweenIfPresent(LotteryBasketballMatchSportteryDO::getMatchDate, reqVO.getMatchDate())
                .eqIfPresent(LotteryBasketballMatchSportteryDO::getMatchNum, reqVO.getMatchNum())
                .eqIfPresent(LotteryBasketballMatchSportteryDO::getMatchNumStr, reqVO.getMatchNumStr())
                .eqIfPresent(LotteryBasketballMatchSportteryDO::getMatchStatus, reqVO.getMatchStatus())
                .betweenIfPresent(LotteryBasketballMatchSportteryDO::getMatchTime, reqVO.getMatchTime())
                .eqIfPresent(LotteryBasketballMatchSportteryDO::getSellStatus, reqVO.getSellStatus())
                .eqIfPresent(LotteryBasketballMatchSportteryDO::getSfBonus, reqVO.getSfBonus())
                .eqIfPresent(LotteryBasketballMatchSportteryDO::getRsfBonus, reqVO.getRsfBonus())
                .eqIfPresent(LotteryBasketballMatchSportteryDO::getDxBonus, reqVO.getDxBonus())
                .eqIfPresent(LotteryBasketballMatchSportteryDO::getWnmBonus, reqVO.getWnmBonus())
                .eqIfPresent(LotteryBasketballMatchSportteryDO::getSingle, reqVO.getSingle())
                .eqIfPresent(LotteryBasketballMatchSportteryDO::getGoalLine, reqVO.getGoalLine())
                .eqIfPresent(LotteryBasketballMatchSportteryDO::getDxLine, reqVO.getDxLine())
                .betweenIfPresent(LotteryBasketballMatchSportteryDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(LotteryBasketballMatchSportteryDO::getMatchId));
    }

}
